import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import 'package:junyeyishu/utils/utils.dart';
import 'route.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';

void main() async{
 
    WidgetsFlutterBinding.ensureInitialized();
  // await FlutterDownloader.initialize();
 
  if (!kIsWeb) {
    const style = SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      statusBarBrightness: Brightness.dark,
      statusBarIconBrightness: Brightness.dark,
    );
    SystemChrome.setSystemUIOverlayStyle(style);
  }

  runApp(const MyApp());
} 

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
       scaffoldBackgroundColor: Color(0XFF0c1012),
        iconTheme: const IconThemeData(color: Colors.black),
      ),
      //  initialRoute: pageRecordPage,
       
     initialRoute: PageLoad,
      onGenerateRoute: XYRoute.generateRoute,
      debugShowCheckedModeBanner: false,
      builder: EasyLoading.init(),
    );
  }
}
